(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 11.2' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[     14475,        389]
NotebookOptionsPosition[     11079,        330]
NotebookOutlinePosition[     11427,        345]
CellTagsIndexPosition[     11384,        342]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Sample Data", "Subsection",
 CellChangeTimes->{{3.7102213947258806`*^9, 3.710221406446529*^9}, {
  3.716096824255646*^9, 
  3.716096824840225*^9}},ExpressionUUID->"a85e55ae-1c46-4858-a27c-\
28306744c88e"],

Cell[BoxData[{
 RowBox[{
  RowBox[{
  "url", "=", 
   "\"\<http://www.loci.wisc.edu/files/software/data/embryo2.zip\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"progress", "=", " ", "0."}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"progFunction", "[", 
   RowBox[{"_", ",", " ", "\"\<progress\>\"", ",", " ", 
    RowBox[{"{", 
     RowBox[{"dlnow_", ",", " ", "dltotal_", ",", " ", "_", ",", " ", "_"}], 
     "}"}]}], "]"}], ":=", " ", 
  RowBox[{"Quiet", "[", 
   RowBox[{"progress", " ", "=", " ", 
    RowBox[{"dlnow", "/", "dltotal"}]}], "]"}]}]}], "Input",
 CellChangeTimes->{
  3.7102213181219745`*^9},ExpressionUUID->"c0946d5e-814b-46e8-ad04-\
f3500a2b5e1b"],

Cell[BoxData[
 RowBox[{"Dynamic", "[", 
  RowBox[{"ProgressIndicator", "[", "progress", "]"}], "]"}]], "Input",Express\
ionUUID->"27201c42-b152-40d7-abe3-59e8573e0586"],

Cell[BoxData[
 RowBox[{"URLSaveAsynchronous", "[", 
  RowBox[{"url", ",", " ", 
   RowBox[{"FileNameJoin", "[", 
    RowBox[{"{", 
     RowBox[{"$UserDocumentsDirectory", ",", " ", "\"\<embryo2.zip\>\""}], 
     "}"}], "]"}], ",", " ", "progFunction", ",", " ", 
   RowBox[{"\"\<Progress\>\"", "\[Rule]", "True"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.710220950696994*^9, 3.710220958012452*^9}, {
  3.7102210839364767`*^9, 3.710221109326025*^9}, {3.7102212315150023`*^9, 
  3.710221235063882*^9}, {3.7102213408195724`*^9, 
  3.7102213566741524`*^9}},ExpressionUUID->"043e14c7-48d6-4b28-b2cd-\
f421d55b6164"],

Cell[BoxData[
 RowBox[{"filePaths", "=", 
  RowBox[{"ExtractArchive", "[", 
   RowBox[{
    RowBox[{"FileNameJoin", "[", 
     RowBox[{"{", 
      RowBox[{"$UserDocumentsDirectory", ",", " ", "\"\<embryo2.zip\>\""}], 
      "}"}], "]"}], ",", "$UserDocumentsDirectory"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.7102216356196957`*^9, 
  3.7102216835447893`*^9}},ExpressionUUID->"1da59a94-3e16-4ac5-a2b7-\
c6edc2f66ae4"],

Cell[BoxData[
 RowBox[{"filePath", "=", 
  RowBox[{"filePaths", "[", 
   RowBox[{"[", "1", "]"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.7102217944708843`*^9, 
  3.7102218040610075`*^9}},ExpressionUUID->"c9a38549-0eed-43e2-9360-\
b6a832507cd0"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Read Elements", "Subsection",
 CellChangeTimes->{{3.710221422025346*^9, 3.7102214253795357`*^9}, {
  3.710232596248918*^9, 
  3.710232599322341*^9}},ExpressionUUID->"6e9b2bfd-b645-48fd-b26b-\
64572a1af478"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<BioFormatsLink`\>\"", "]"}]], "Input",ExpressionUU\
ID->"1367e1de-b06f-4ae9-aab1-161e07ce4e0b"],

Cell[BoxData[
 RowBox[{"Import", "[", 
  RowBox[{"None", ",", " ", 
   RowBox[{"{", 
    RowBox[{"\"\<BioFormats\>\"", ",", " ", "\"\<Elements\>\""}], "}"}]}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.710232607767373*^9, 
  3.710232615343583*^9}},ExpressionUUID->"60422bb3-b84d-4533-b0eb-\
673b8a337cdf"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Read Series Count", "Subsection",
 CellChangeTimes->{{3.710221422025346*^9, 3.7102214253795357`*^9}, {
   3.7123027963153024`*^9, 3.7123027987755055`*^9}, 
   3.7123030610780725`*^9},ExpressionUUID->"89783383-9536-4321-bcfb-\
7b630267b084"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<BioFormatsLink`\>\"", "]"}]], "Input",
 CellChangeTimes->{{3.7102203312725143`*^9, 
  3.710220337935851*^9}},ExpressionUUID->"d780411b-486e-44a8-be7d-\
d8eb7feab12a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Import", "[", 
  RowBox[{"filePath", ",", " ", 
   RowBox[{"{", 
    RowBox[{"\"\<BioFormats\>\"", ",", 
     RowBox[{"{", "\"\<SeriesCount\>\"", "}"}]}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.7102203836252747`*^9, 3.7102203922474885`*^9}, {
  3.7102237812588735`*^9, 3.7102237843598228`*^9}, {3.710232553729948*^9, 
  3.7102325609327965`*^9}, {3.712302808440713*^9, 3.712302816113085*^9}, {
  3.7123030797951193`*^9, 
  3.7123030879200974`*^9}},ExpressionUUID->"3841dc6f-62e5-4f04-915b-\
6e7b99ca953b"],

Cell[BoxData["2"], "Output",
 CellChangeTimes->{
  3.712324283524748*^9},ExpressionUUID->"dc02827a-96f0-4fa9-9752-\
591b0adcb1df"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Read All Series", "Subsection",
 CellChangeTimes->{{3.710221422025346*^9, 3.7102214253795357`*^9}, {
  3.7123242817215147`*^9, 3.7123242868068547`*^9}, {3.7123244232899218`*^9, 
  3.7123244251377277`*^9}},ExpressionUUID->"bf2f4865-011b-4296-9ef8-\
3852f1740576"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<BioFormatsLink`\>\"", "]"}]], "Input",
 CellChangeTimes->{{3.7102203312725143`*^9, 
  3.710220337935851*^9}},ExpressionUUID->"958adee1-7551-493c-8296-\
4ec2ec3e256f"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{"embryoSeries1", ",", "embryoSeries2"}], "}"}], "=", 
   RowBox[{"Import", "[", 
    RowBox[{"filePath", ",", " ", "\"\<BioFormats\>\""}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.7123029134940987`*^9, 3.7123029273016944`*^9}, {
  3.7123242898462477`*^9, 3.7123242920328283`*^9}, {3.7123244437745314`*^9, 
  3.7123244787338023`*^9}},ExpressionUUID->"2610c79e-861e-478f-bbbc-\
8f5dbedc780a"],

Cell[BoxData[
 RowBox[{
  RowBox[{"embryoSeries1", "=", 
   RowBox[{"BlockMap", "[", 
    RowBox[{"ColorCombine", ",", 
     RowBox[{"First", "[", "embryoSeries1", "]"}], ",", "3"}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.712324590648133*^9, 3.712324608801425*^9}, {
  3.712324650731858*^9, 
  3.712324664626377*^9}},ExpressionUUID->"61fbe9e7-8a0b-4bc6-bdfb-\
a56723b7fcb0"],

Cell[BoxData[
 RowBox[{"Manipulate", "[", 
  RowBox[{
   RowBox[{"ImageAdjust", "[", 
    RowBox[{
    "embryoSeries1", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], 
    "]"}], ",", 
   RowBox[{"{", 
    RowBox[{"k", ",", "1", ",", 
     RowBox[{"Length", "[", "embryoSeries1", "]"}], ",", "1"}], "}"}]}], 
  "]"}]], "Input",ExpressionUUID->"7b68cbfd-80a6-42be-b192-ce3265a02dcf"],

Cell[BoxData[
 RowBox[{
  RowBox[{"embryoSeries2", "=", 
   RowBox[{"First", "[", "embryoSeries2", "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.7123246177219863`*^9, 
  3.7123246196122856`*^9}},ExpressionUUID->"452b6e2b-2a26-4f04-88aa-\
07371055b57a"],

Cell[BoxData[
 RowBox[{"Manipulate", "[", 
  RowBox[{
   RowBox[{"ImageAdjust", "[", 
    RowBox[{
    "embryoSeries2", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], 
    "]"}], ",", 
   RowBox[{"{", 
    RowBox[{"k", ",", "1", ",", 
     RowBox[{"Length", "[", "embryoSeries2", "]"}], ",", "1"}], "}"}]}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.71232469001418*^9, 
  3.712324693037057*^9}},ExpressionUUID->"b30f229e-a63b-40fa-b609-\
cade7d1b7b0e"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Read Specific Series", "Subsection",
 CellChangeTimes->{{3.710221422025346*^9, 3.7102214253795357`*^9}, {
  3.7123242817215147`*^9, 3.7123242868068547`*^9}, {3.7123244297226944`*^9, 
  3.7123244363134303`*^9}},ExpressionUUID->"512a47e6-5681-4d65-b1c2-\
9b2f0b09664c"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<BioFormatsLink`\>\"", "]"}]], "Input",
 CellChangeTimes->{{3.7102203312725143`*^9, 
  3.710220337935851*^9}},ExpressionUUID->"521578af-e490-44a3-8b55-\
21e3c1f7bd3a"],

Cell[BoxData[
 RowBox[{
  RowBox[{"embryoSeries1", "=", 
   RowBox[{"Import", "[", 
    RowBox[{"filePath", ",", " ", 
     RowBox[{"{", 
      RowBox[{"\"\<BioFormats\>\"", ",", "\"\<ImageList\>\"", ",", "1"}], 
      "}"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.7123029134940987`*^9, 3.7123029273016944`*^9}, {
  3.7123242898462477`*^9, 3.7123242920328283`*^9}, {3.712324712607189*^9, 
  3.7123247193451023`*^9}},ExpressionUUID->"dfdbadbd-5215-4886-8ad1-\
6044f609bf1e"],

Cell[BoxData[
 RowBox[{
  RowBox[{"embryoSeries1", "=", 
   RowBox[{"BlockMap", "[", 
    RowBox[{"ColorCombine", ",", 
     RowBox[{"First", "[", "embryoSeries1", "]"}], ",", "3"}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.712324590648133*^9, 3.712324608801425*^9}, {
  3.712324650731858*^9, 
  3.712324664626377*^9}},ExpressionUUID->"416fbe37-275a-4907-90d0-\
8adb7dcfd93c"],

Cell[BoxData[
 RowBox[{"Manipulate", "[", 
  RowBox[{
   RowBox[{"ImageAdjust", "[", 
    RowBox[{
    "embryoSeries1", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], 
    "]"}], ",", 
   RowBox[{"{", 
    RowBox[{"k", ",", "1", ",", 
     RowBox[{"Length", "[", "embryoSeries1", "]"}], ",", "1"}], "}"}]}], 
  "]"}]], "Input",ExpressionUUID->"91b846ed-5c34-4e04-a840-abed3dec6a36"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Read Original Metadata", "Subsection",
 CellChangeTimes->{{3.710221422025346*^9, 3.710221433975211*^9}, {
  3.7106046650236588`*^9, 
  3.710604665560047*^9}},ExpressionUUID->"c53a120f-69db-4179-b919-\
305188f61916"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<BioFormatsLink`\>\"", "]"}]], "Input",ExpressionUU\
ID->"90831b8b-aaf2-4f27-b694-79901a3a8635"],

Cell[BoxData[
 RowBox[{"Import", "[", 
  RowBox[{"filePath", ",", "  ", 
   RowBox[{"{", 
    RowBox[{
    "\"\<BioFormats\>\"", ",", " ", "\"\<OriginalMetaInformation\>\""}], 
    "}"}]}], "]"}]], "Input",
 CellChangeTimes->{
  3.710220471095227*^9, {3.710223798769579*^9, 3.7102237999216747`*^9}, {
   3.7102325853655667`*^9, 3.710232586174837*^9}, {3.710232637761404*^9, 
   3.7102326438481283`*^9}, {3.710509049572131*^9, 3.7105090508520193`*^9}, 
   3.710604674834178*^9, 
   3.7123009772997255`*^9},ExpressionUUID->"b97f275b-799f-46fa-81f5-\
d7edd1f5f1f9"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Read OME-XML Metadata", "Subsection",
 CellChangeTimes->{{3.710221422025346*^9, 3.710221433975211*^9}, {
  3.7106046650236588`*^9, 
  3.710604684064805*^9}},ExpressionUUID->"11386666-02f3-4652-821e-\
a6ecffe12546"],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<BioFormatsLink`\>\"", "]"}]], "Input",ExpressionUU\
ID->"b3e26161-d446-48c2-9638-df29b9e59930"],

Cell[BoxData[
 RowBox[{"Import", "[", 
  RowBox[{"filePath", ",", "  ", 
   RowBox[{"{", 
    RowBox[{"\"\<BioFormats\>\"", ",", " ", "\"\<OMEXMLMetaInformation\>\""}],
     "}"}]}], "]"}]], "Input",
 CellChangeTimes->{
  3.710220471095227*^9, {3.710223798769579*^9, 3.7102237999216747`*^9}, {
   3.7102325853655667`*^9, 3.710232586174837*^9}, {3.710232637761404*^9, 
   3.7102326438481283`*^9}, {3.710509049572131*^9, 3.7105090508520193`*^9}, {
   3.710604674834178*^9, 3.710604689145271*^9}, 
   3.7123009809360313`*^9},ExpressionUUID->"5e0b3e69-a13e-4f21-9e98-\
16f7e1b2d32f"]
}, Open  ]]
},
WindowSize->{759, 833},
WindowMargins->{{511, Automatic}, {Automatic, 84}},
FrontEndVersion->"11.2 for Microsoft Windows (64-bit) (September 10, 2017)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 210, 4, 53, "Subsection",ExpressionUUID->"a85e55ae-1c46-4858-a27c-28306744c88e"],
Cell[793, 28, 695, 19, 86, "Input",ExpressionUUID->"c0946d5e-814b-46e8-ad04-f3500a2b5e1b"],
Cell[1491, 49, 168, 3, 28, "Input",ExpressionUUID->"27201c42-b152-40d7-abe3-59e8573e0586"],
Cell[1662, 54, 611, 12, 48, "Input",ExpressionUUID->"043e14c7-48d6-4b28-b2cd-f421d55b6164"],
Cell[2276, 68, 420, 10, 48, "Input",ExpressionUUID->"1da59a94-3e16-4ac5-a2b7-c6edc2f66ae4"],
Cell[2699, 80, 246, 6, 28, "Input",ExpressionUUID->"c9a38549-0eed-43e2-9360-b6a832507cd0"]
}, Open  ]],
Cell[CellGroupData[{
Cell[2982, 91, 212, 4, 53, "Subsection",ExpressionUUID->"6e9b2bfd-b645-48fd-b26b-64572a1af478"],
Cell[3197, 97, 137, 2, 28, "Input",ExpressionUUID->"1367e1de-b06f-4ae9-aab1-161e07ce4e0b"],
Cell[3337, 101, 305, 8, 28, "Input",ExpressionUUID->"60422bb3-b84d-4533-b0eb-673b8a337cdf"]
}, Open  ]],
Cell[CellGroupData[{
Cell[3679, 114, 246, 4, 53, "Subsection",ExpressionUUID->"89783383-9536-4321-bcfb-7b630267b084"],
Cell[3928, 120, 208, 4, 28, "Input",ExpressionUUID->"d780411b-486e-44a8-be7d-d8eb7feab12a"],
Cell[CellGroupData[{
Cell[4161, 128, 537, 11, 28, "Input",ExpressionUUID->"3841dc6f-62e5-4f04-915b-6e7b99ca953b"],
Cell[4701, 141, 130, 3, 32, "Output",ExpressionUUID->"dc02827a-96f0-4fa9-9752-591b0adcb1df"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[4880, 150, 268, 4, 53, "Subsection",ExpressionUUID->"bf2f4865-011b-4296-9ef8-3852f1740576"],
Cell[5151, 156, 208, 4, 28, "Input",ExpressionUUID->"958adee1-7551-493c-8296-4ec2ec3e256f"],
Cell[5362, 162, 464, 11, 28, "Input",ExpressionUUID->"2610c79e-861e-478f-bbbc-8f5dbedc780a"],
Cell[5829, 175, 386, 10, 28, "Input",ExpressionUUID->"61fbe9e7-8a0b-4bc6-bdfb-a56723b7fcb0"],
Cell[6218, 187, 391, 10, 28, "Input",ExpressionUUID->"7b68cbfd-80a6-42be-b192-ce3265a02dcf"],
Cell[6612, 199, 254, 6, 28, "Input",ExpressionUUID->"452b6e2b-2a26-4f04-88aa-07371055b57a"],
Cell[6869, 207, 461, 13, 28, "Input",ExpressionUUID->"b30f229e-a63b-40fa-b609-cade7d1b7b0e"]
}, Open  ]],
Cell[CellGroupData[{
Cell[7367, 225, 273, 4, 53, "Subsection",ExpressionUUID->"512a47e6-5681-4d65-b1c2-9b2f0b09664c"],
Cell[7643, 231, 208, 4, 28, "Input",ExpressionUUID->"521578af-e490-44a3-8b55-21e3c1f7bd3a"],
Cell[7854, 237, 484, 11, 28, "Input",ExpressionUUID->"dfdbadbd-5215-4886-8ad1-6044f609bf1e"],
Cell[8341, 250, 386, 10, 28, "Input",ExpressionUUID->"416fbe37-275a-4907-90d0-8adb7dcfd93c"],
Cell[8730, 262, 391, 10, 28, "Input",ExpressionUUID->"91b846ed-5c34-4e04-a840-abed3dec6a36"]
}, Open  ]],
Cell[CellGroupData[{
Cell[9158, 277, 221, 4, 53, "Subsection",ExpressionUUID->"c53a120f-69db-4179-b919-305188f61916"],
Cell[9382, 283, 137, 2, 28, "Input",ExpressionUUID->"90831b8b-aaf2-4f27-b694-79901a3a8635"],
Cell[9522, 287, 562, 13, 28, "Input",ExpressionUUID->"b97f275b-799f-46fa-81f5-d7edd1f5f1f9"]
}, Open  ]],
Cell[CellGroupData[{
Cell[10121, 305, 220, 4, 53, "Subsection",ExpressionUUID->"11386666-02f3-4652-821e-a6ecffe12546"],
Cell[10344, 311, 137, 2, 28, "Input",ExpressionUUID->"b3e26161-d446-48c2-9638-df29b9e59930"],
Cell[10484, 315, 579, 12, 28, "Input",ExpressionUUID->"5e0b3e69-a13e-4f21-9e98-16f7e1b2d32f"]
}, Open  ]]
}
]
*)

